package StudyCode.summary.myfile;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class RemovesFileExtensionFromFileName {
	public static void main(String[] argv) {
		String fileName = "tah1986.txt";
		System.out.println("文件名:" + fileName + " 删除扩展名后是:");
		System.out.println(removeFileExtension(fileName));
	}

	private static String removeFileExtension(String fileName) {
		return fileName.split("\\.")[0];
	}
}
